{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "Int64Index: 49352 entries, 10 to 99994\n",
      "Data columns (total 15 columns):\n",
      "bathrooms          49352 non-null float64\n",
      "bedrooms           49352 non-null int64\n",
      "building_id        49352 non-null object\n",
      "created            49352 non-null object\n",
      "description        49352 non-null object\n",
      "display_address    49352 non-null object\n",
      "features           49352 non-null object\n",
      "interest_level     49352 non-null object\n",
      "latitude           49352 non-null float64\n",
      "listing_id         49352 non-null int64\n",
      "longitude          49352 non-null float64\n",
      "manager_id         49352 non-null object\n",
      "photos             49352 non-null object\n",
      "price              49352 non-null int64\n",
      "street_address     49352 non-null object\n",
      "dtypes: float64(3), int64(3), object(9)\n",
      "memory usage: 6.0+ MB\n",
      "None\n"
     ]
    }
   ],
   "source": [
    "train_data = pd.read_json(\"RentListingInquries_train.json\")\n",
    "test_data = pd.read_json(\"RentListingInquries_test.json\")\n",
    "print(train_data.info())\n",
    "#没有缺失值，出去listing_id外，有6个数字类型的特征。interest_level是需要在测试集进行预测的lable"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1、数据分布及特征处理"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.1 price异常值的处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAD8CAYAAACyyUlaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdG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Tcg1fKdiSSpmncmkqRqhonUkIh4JCJejIjxpnuRahkm\nUnO+BaxvugnpSjBMpIZk5mHgdNN9SFeCYSJJqmaYSJKqGSaSpGqGiSSpmmEiNSQiOsAPgD+JiMmI\nGG66J6lXfgNeklTNOxNJUjXDRJJUzTCRJFUzTCRJ1QwTSVI1w0SSVM0wkSRVM0wkSdX+HwX75NVx\n11zXAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1b8ae667198>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\ipykernel_launcher.py:6: DeprecationWarning: \n",
      ".ix is deprecated. Please use\n",
      ".loc for label based indexing or\n",
      ".iloc for positional indexing\n",
      "\n",
      "See the documentation here:\n",
      "http://pandas.pydata.org/pandas-docs/stable/indexing.html#ix-indexer-is-deprecated\n",
      "  \n",
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexing.py:179: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
      "  self._setitem_with_indexer(indexer, value)\n"
     ]
    }
   ],
   "source": [
    "#价格的箱线图\n",
    "plt.boxplot(train_data.price)\n",
    "plt.show()\n",
    "#发现有异常值并处理\n",
    "ulimit = np.percentile(train_data.price.values, 90)\n",
    "train_data['price'].ix[train_data['price']>ulimit] = ulimit"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAfkAAAF6CAYAAAAakiGSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\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s0xvXaG3721m\nVg681mVZjLdNppk97r1XrZn9ocuxP2Vm682szszeNbOzB/lbI+JrCnmRyPAtAhPITAfOITCxyL8A\nmNllwN0Exp8fDyzow/FuJDA85yigHfhxt/ULCMxKd2kP+y4iMAf9VAJTc97v1TETeAz4MoHhQn8O\nLO36z4iInB6FvEhkuB641zl3yDl3GPg34AZv3TXA4865Lc65Jm9dbxY55zY7544B3wau6dax7rvO\nuWPOueauO3kzdV0O3Omcq3XOtTnn3vRWfwn4uXNupQtMY/sE0ErgnxMR6QeFvEhkGAWUdfm6zFt2\nYt2+Luu6vj6ZrtuUAbFAdh+OkQ/UOOdqe1hXAPxf71J9nZnVeduP6mFbEekDhbxIZKgkEKInjOGv\n81hXEZjX+oSu812fTNdtxhCYgbC6y7KTzXy1D8g8MU1tD+u+75zL6PKR5Jx7ug/1iEgPFPIikeFp\n4F+8eeCzge8Av/HWPQPcYmZTzCzJW9ebL5pZsbf9vcCzzrmO3nZygTm1XwQe8ubUjjWzC73VvwDu\nNLO53jzcyWb2yRNzmIvI6VPIi0SG7/HXubA3Aeu8ZTjnXiTQce51AnNcr/D2aT3F8RYBvwIOEJgz\n/R9Oo5YbCJz5bwcOAf/o1bGGwH35nwK1Xi03n8ZxRaQbzScvIn/DzKYAm4F451x7D+vfAH7jnPvl\nUNcmIqdHZ/Iigpl91szizGwYcB/wx54CXkTCi0JeRCDwbPphYDfQAXwluOWIyEDQ5XoRERGf0pm8\niIiITynkRUREfEohLyIi4lMKeREREZ9SyIuIiPiUQl5ERMSn/n/n2LR9xI5RwQAAAABJRU5ErkJg\ngg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1b8ae647198>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#价格的分布\n",
    "plt.figure(figsize=(8,6))\n",
    "sns.distplot(train_data['price'],bins=50,kde=True)\n",
    "plt.xlabel('log price', fontsize=12)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\ipykernel_launcher.py:3: DeprecationWarning: \n",
      ".ix is deprecated. Please use\n",
      ".loc for label based indexing or\n",
      ".iloc for positional indexing\n",
      "\n",
      "See the documentation here:\n",
      "http://pandas.pydata.org/pandas-docs/stable/indexing.html#ix-indexer-is-deprecated\n",
      "  This is separate from the ipykernel package so we can avoid doing imports until\n",
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexing.py:179: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
      "  self._setitem_with_indexer(indexer, value)\n"
     ]
    }
   ],
   "source": [
    "#测试集上的price处理\n",
    "ulimit = np.percentile(test_data.price.values, 90)\n",
    "test_data['price'].ix[test_data['price']>ulimit] = ulimit"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.2 卧室、浴室的分布以及异常值处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAENCAYAAAAykHOlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3XuYVmW9//H3R1QQwY0CkoI4Y5LI\nSdQBQWQ2iCEqP0nTxNypSOEuSqOdu2wXFlvblf5Mycoo8FAe8Jj8lPKQehGoKCiiAuWoBCNsRQ4m\nKiLw/f2x1owPwwzMwKxZM8PndV3PNc+6173W833mAr7ch3XfigjMzMzq2x55B2BmZs2TE4yZmW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j77LNZv349kKx3N2nSJE444QTuvvtuXnvtNUaMGMGxxx7L4MGDWbJkCQB33303vXr14qij\njqK0tJSNGzcyceJEpk+fTt++fZk+fXr1wRZYtWoVn//85+nXrx/9+vVjzpw5bNmyhaKiItatW1dZ\n7/DDD+ett96qtr5ZfXIXmdl2vPDCC7zyyiscfPDBDBo0iDlz5nDJJZdw7bXX8sQTT9ChQwfeeecd\nrrzySh577DH23XdffvrTn3LttdcyceJEIHk4cfbs2QAMGzaMG2+8kW7dujF37ly+9rWv8fjjjzNp\n0iQefvhhOnfuzLp169h7772ZNGlSnbqqLr30UiZMmMAJJ5zAsmXLOPnkk1m8eDGjRo3i/vvvZ8yY\nMcydO5eioiI6derEF7/4xWrrm9UXJxiz7ejfvz9duiSrGPXt25elS5dywgknbFXnmWeeYdGiRQwa\nNAiAjRs3MnDgwMrz55xzDgDr16/nqaee4uyzz64899FHHwEwaNAgLrzwQr7whS9w5pln7lSsjz32\nGIsWLao8/uc//8l7773HOeecw6RJkxgzZgx33nlnZTw11TerL04wZtvRsmXLyvctWrRg06ZN29SJ\nCD772c9yxx13VHuPfffdF4AtW7bQrl07FixYsE2dG2+8kblz5/LQQw/Rt2/fauvsyJYtW3j66afZ\nZ599tiofOHAgZWVlrFq1ij/+8Y98//vf3259s/riMRizndC2bdvK/+0PGDCAOXPmUFZWBsAHH3zA\n3//+922u2W+//SguLubuu+8GksT04osvAvDaa69x3HHHMWnSJDp06MDy5cu3+ozaGD58+FbdaRVJ\nShJnnHEG3/rWtzjyyCNp3779duub1RcnGLOdMG7cOE455RSGDh1Kx44dufnmmzn33HPp06cPAwYM\nqBy8r+q2225j6tSpHHXUUfTs2ZMHHkgWnbjsssvo3bs3vXr1orS0lKOOOoqhQ4eyaNGiWg/yT548\nmXnz5tGnTx969OjBjTfeWHnunHPO4Q9/+ENl99iO6pvVB32yBNjup6SkJJrLjpZ+DmbnLF68mCOP\nPDLvMJoU/85M0vyIKNlRPbdgzMwsEx7kN2sCbrrpJq6//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j4p2d+C77kSTHtSTdbKtJ9m03q1feD8bMzDLhFoyZmWXCCcbMzDLhBGNmZplwgjEz\ns0w4wZiZWSacYMzMLBNOMGZmlgknGDMzy4QTjJmZZeL/AzbfEYlVpzsJAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1b8ae60e278>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot(x='bedrooms',hue='interest_level',data = train_data)\n",
    "plt.ylabel('Numbers', fontsize=12)\n",
    "plt.xlabel('bedrooms', fontsize=12)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAENCAYAAAAykHOlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xt8VeWV//HPElFQsCAgOgQNKCN3\nIndEUvCCaB3xWuTnKKIttoUyasuvOm1RmbFj/TGtRVstVrxMVVDRylgsYkd/CBUFKiJGWiKNEqEQ\nuagoF4E1f+wn8RBOknNOzs5Jwvf9ep1X9nn2s9deJznJyr6c5zF3R0REJNsOy3UCIiLSOKnAiIhI\nLFRgREQkFiowIiISCxUYERGJhQqMiIjEQgVGRERioQIjIiKxUIEREZFYHJ7rBHKpbdu2np+fn+s0\nREQalBUrVnzk7u1q6ndIF5j8/HyWL1+e6zRERBoUM3s/lX46RSYiIrFQgRERkViowIiISCwO6Wsw\nyXzxxReUlpaya9euXKfSIDRr1oy8vDyaNm2a61REpJ5RgamktLSUli1bkp+fj5nlOp16zd3ZsmUL\npaWldOrUKdfpiEg9o1NklezatYs2bdqouKTAzGjTpo2O9kQkKRWYJFRcUqfvlYhURQVGRER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cKNFcxO1AH4CzPFo2uQnga+Z2VnhaON7wG7gT+nuxMxG\nmFmvcPT1CdEps321zF0EUIERqcnjwItEF+DXAf9ONN99c+Ajonk+/lBpm18Al4W7xWZkuN9ZRKev\nFgF/A3YB3wVw978A/0w0De9HRBfx/8nd92Swn+OJZmP8hGjSsf8PVJ5VUyQjmg9GRERioSMYERGJ\nhQqMiIjEQgVGRERioQIjIiKxUIEREZFYqMCIiEgsVGBERCQWKjAiIhILFRgREYnF/wICy48ryOZO\n0gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1b8ad945860>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot(x='bathrooms',hue='interest_level',data = train_data)\n",
    "plt.ylabel('Numbers', fontsize=12)\n",
    "plt.xlabel('bathrooms', fontsize=12)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#bathroom 训练集异常值处理\n",
    "train_data.loc[train_data['bathrooms'] > 10,'price'] = train_data['bathrooms'].mean()\n",
    "\n",
    "#bathroom 测试集异常值处理\n",
    "test_data.loc[test_data['bathrooms'] > 10,'price'] = test_data['bathrooms'].mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.3 interest_level"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAENCAYAAAAykHOlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAG35JREFUeJzt3X+0XXV95vH3Q/ipqAS4MJgAwRIr\n4NKoF0hH6xLQEFjW0Ao1OE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6bdAk4DjgU5KOt72e6t50729Y5IPADeVWNCeV7f5R6cft\nvPRuwBHDloCJ2OYXtq+0vRWYT/X8nIFup/5e4CHbX7e9xfaPgW8DJze0WWj7h+X2/ZuBjwJ/ZntT\nuZv1XwOzS9vny/YOtv287ds9sl9BHwl02b7Q9nO21wJXNmznWqowpNzKZHapQfVcms/ZfsD2ltK/\naTmKiZHKzS4jtum7QSi2ny03Pd5zgLYHA0dLerKhtjPwjYbPjzRMdwGvAO4p64Xq1u5912b+BrgA\n+F6Zf4Xtz49gHw4GXtuvXxPYdoPTG4D/Kem1VA/OcsO8g4G/l3RJw7KiOhL6xQj6Eju4BEzE8PQ/\nmngE+Bfb7xnmMo8DvwGOsP3LlzSsjmjOAs4qp9mWSVpu+5Ym2x7MI1QPxJratEP2k5K+R/VcoMOo\nHlTnhmUvtv3NFrYXMaCcIosYnkeB1zV8vgl4vaQPSdqlvI6UdFizhctpsiuBSyXtByBpkqTjy/R7\nJR1aTlv9muphVFsH2PZg7gZ+LekcVc+KnyDpjZKObGhzLXAa1bWYaxvqXwPO67uOJOk1kk4Z5nYj\nXiIBEzE8fw+cXEZXXVaOOGZQXcNYT3V67QvAboOs4xygB7hT0q+B7wO/W+ZNLZ+foboQ/1Xbt5Z5\nnwP+RxlhdvZgnSzXj/6AaiDBOqojp3+guqtvn0Vle4/a/mnDsjeWfVhQ+ncfcMJg24sYTO6mHBER\ntcgRTERE1CIBExERtUjARERELRIwERFRiwRMRETUIgETERG1SMBEREQtEjAREVGLBExERNTi/wPz\nlSwoxFMrowAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1b8ae673278>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "interest_level = train_data['interest_level'].value_counts()\n",
    "sns.barplot(interest_level.index,interest_level.values,alpha=0.8, color='g')\n",
    "plt.ylabel('Numbers', fontsize=12)\n",
    "plt.xlabel('Interest level', fontsize=12)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.4 建造时间的分布, 建造时间都在2016年4月到6月"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEsCAYAAADKGWQqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAGmRJREFUeJzt3X20XFV9//H3h4AsKZBAuFLMTbwo\nKYoPrXiLtPx+LTVdyoNtaCsF2mKEaLQLn/tA7M+WVqsL+qBil7pWFiChS6GUqqQN1dIAsmwbIARE\nEZEUIrmAJEBAWdhi9Pv74+wLw829d+bOnJkzO/vzWmvWPbPPmZnPPcmd7+y9zzmjiMDMzMqzV9MB\nzMysGS4AZmaFcgEwMyuUC4CZWaFcAMzMCuUCYGZWKBcAM7NCuQCYmRXKBcDMrFB7Nx1gNoccckiM\njY01HcPMLCu33nrrIxEx0m67oS4AY2NjbNq0qekYZmZZkfTdTrbzEJCZWaFcAMzMCuUCYGZWqLYF\nQNIlkrZL+mZL219L+rakOyR9UdKClnUfkLRF0t2S3tDSfkJq2yJpdf2/ipmZzUUnPYBLgROmtF0L\nvCIiXgV8B/gAgKSjgNOBl6fHfFrSPEnzgE8BJwJHAWekbc3MrCFtC0BE3Ag8NqXt3yJiV7q7ERhN\ny8uBKyLifyPiPmALcEy6bYmIeyPiaeCKtK2ZmTWkjjmAs4F/TcuLgG0t6yZS20ztu5G0StImSZt2\n7NhRQzwzM5tOTwVA0v8DdgGfm2yaZrOYpX33xog1ETEeEeMjI23PYzAzsy51fSKYpBXAG4Fl8ewX\nC08Ai1s2GwUeTMsztZuZWQO6KgCSTgDOBX45Ip5qWbUO+LykjwEvBJYCN1P1AJZKOhx4gGq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ain": [
       "<matplotlib.figure.Figure at 0x1b8c97fd278>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "train_data['date_created']=pd.to_datetime(train_data['created'])\n",
    "train_data['datecre']= train_data['date_created'].dt.date\n",
    "count_date = train_data['datecre'].value_counts()\n",
    "\n",
    "plt.bar(count_date.index,count_date.values)\n",
    "plt.xticks(rotation='vertical')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.5 确定维度的最好聚类个数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.cluster import KMeans\n",
    "from sklearn import metrics\n",
    "def cluster_processing(k, titude_data):\n",
    "    print(\"K-means begin with clusters: {}\".format(K));\n",
    "    mb_kmeans = KMeans(n_clusters=k, random_state=0)\n",
    "    mb_kmeans.fit(titude_data)\n",
    "\n",
    "    ch_score = metrics.silhouette_score(titude_data, mb_kmeans.predict(titude_data))\n",
    "    print(mb_kmeans.predict(titude_data))\n",
    "    return ch_score\n",
    "train_location = train_data.loc[:,['latitude','longitude']]\n",
    "k_class = [10, 20, 30, 40]\n",
    "ch_scores = []\n",
    "for K in k_class:\n",
    "    ch = cluster_processing(K, train_location)\n",
    "    ch_scores.append(ch)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "#### 1.6 Address及日期格式的处理\n",
    "计算两个address字符串之间的Levenshtein 的相似度。小于0.5的比例占整个数据集的2%。所以可以考虑删除其中一个特征"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ration of string simliarity less than 50% are 0.021782298589722807\n"
     ]
    }
   ],
   "source": [
    "import Levenshtein\n",
    "display_array = train_data['display_address'].tolist()\n",
    "street_array = train_data['street_address'].tolist()\n",
    "sim_result = dict()\n",
    "for i in range(len(street_array)):\n",
    "    sim_result[street_array[i]]=Levenshtein.ratio(street_array[i], display_array[i])\n",
    "print('Ration of string simliarity less than 50% are {}'.format(len({k:v for k,v in sim_result.items() if v < 0.5})/len(street_array)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def procdess_created_date(df):\n",
    "    df['Date'] = pd.to_datetime(df['created'])\n",
    "    df['Year'] = df['Date'].dt.year\n",
    "    df['Month'] = df['Date'].dt.month\n",
    "    df['Day'] = df['Date'].dt.day\n",
    "    df['Wday'] = df['Date'].dt.dayofweek\n",
    "    df['Yday'] = df['Date'].dt.dayofyear\n",
    "    df['hour'] = df['Date'].dt.hour\n",
    "    df.drop(['Date', 'created'], axis=1,inplace = True)\n",
    "\n",
    "#处理building id,photos,description\n",
    "def processing_fileds(df):\n",
    "    df.drop(['building_id'],axis = 1, inplace = True)\n",
    "    df.drop(['description'],axis = 1, inplace = True)\n",
    "    df.drop(['photos'], axis=1, inplace=True)\n",
    "    df.drop(['display_address'], axis=1, inplace=True)\n",
    "    # df.drop(['street_address'], axis=1, inplace=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.7 参考kaggle的方案，通过manager_id和interrest_level得出这个manger的skill高低，同时把manager_id按照这个manager在数据集中的分布进行编码"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def processing_train_manager_id(df_data):\n",
    "    \n",
    "    #根据manager对应的interest level的评价来评估这个manager的skill，作为新的feature\n",
    "    train_temp = df_data[['manager_id', 'interest_level']]\n",
    "    interest_dummies = pd.get_dummies(train_temp.interest_level)\n",
    "    train_temp = pd.concat([train_temp, interest_dummies[['low', 'medium', 'high']]], axis=1).drop('interest_level',axis=1)\n",
    "    train_skill = pd.concat([train_temp.groupby('manager_id').mean(), train_temp.groupby('manager_id').count()],\n",
    "                            axis=1).iloc[:, :-2]\n",
    "    train_skill.columns = ['low', 'medium', 'heigh', 'count']\n",
    "    train_skill['manager_id'] = train_skill.index\n",
    "    train_skill['manager_skill'] = train_skill['medium'] * 1 + train_skill['heigh'] * 2\n",
    "\n",
    "    # 本来想取均值化的数据，但是结果数据比较小。小数点后四位了，感觉不适合进行模型训练。故放弃均值化处理\n",
    "    # train_temp['skill'] = train_temp['manager_skill']/train_temp['manager_skill'].sum()\n",
    "    # train_temp.drop('manager_skill',axis = 1,inplace = True)\n",
    "\n",
    "    df = df_data.merge(train_skill[['manager_id', 'manager_skill']])\n",
    "\n",
    "    #print(df['manager_id'].value_counts()['5ba989232d0489da1b5f2c45f6688adc'])\n",
    "    \n",
    "    #根据manager在整个数据集中占的比重，分为几个级别。\n",
    "    manager_count = df['manager_id'].value_counts()\n",
    "\n",
    "    df['top_10_manager'] = df['manager_id'].apply(lambda x:1 if x in manager_count.index.values[manager_count.values\n",
    "    >= np.percentile(manager_count.values,90)] else 0)\n",
    "    df['top_25_manager'] = df['manager_id'].apply(lambda x:1 if x in manager_count.index.values[manager_count.values\n",
    "    >= np.percentile(manager_count.values,75)] else 0)\n",
    "    df['top_5_manager'] = df['manager_id'].apply(lambda x: 1 if x in manager_count.index.values[\n",
    "        manager_count.values >= np.percentile(manager_count.values, 95)] else 0)\n",
    "    df['top_50_manager'] = df['manager_id'].apply(lambda x: 1 if x in manager_count.index.values[\n",
    "        manager_count.values >= np.percentile(manager_count.values, 50)] else 0)\n",
    "    df['top_1_manager'] = df['manager_id'].apply(lambda x: 1 if x in manager_count.index.values[\n",
    "        manager_count.values >= np.percentile(manager_count.values, 99)] else 0)\n",
    "    df['top_2_manager'] = df['manager_id'].apply(lambda x: 1 if x in manager_count.index.values[\n",
    "        manager_count.values >= np.percentile(manager_count.values, 98)] else 0)\n",
    "    df['top_15_manager'] = df['manager_id'].apply(lambda x: 1 if x in manager_count.index.values[\n",
    "        manager_count.values >= np.percentile(manager_count.values, 85)] else 0)\n",
    "    df['top_20_manager'] = df['manager_id'].apply(lambda x: 1 if x in manager_count.index.values[\n",
    "        manager_count.values >= np.percentile(manager_count.values, 80)] else 0)\n",
    "    df['top_30_manager'] = df['manager_id'].apply(lambda x: 1 if x in manager_count.index.values[\n",
    "        manager_count.values >= np.percentile(manager_count.values, 70)] else 0)\n",
    "\n",
    "    df.drop(['manager_id'],axis = 1,inplace = True)\n",
    "    return df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.8 对street _address的处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def processing_address(df_data):\n",
    "    \n",
    "    train_temp = df_data[['street_address', 'interest_level']]\n",
    "    interest_dummies = pd.get_dummies(train_temp.interest_level)\n",
    "    train_temp = pd.concat([train_temp, interest_dummies[['low', 'medium', 'high']]], axis=1).drop('interest_level',\n",
    "                                                                                                   axis=1)\n",
    "    train_address = pd.concat([train_temp.groupby('street_address').mean(), train_temp.groupby('street_address').count()],\n",
    "                            axis=1).iloc[:, :-2]\n",
    "    train_address.columns = ['low', 'medium', 'heigh', 'count']\n",
    "    #print(train_address.sort_values(by = 'count',ascending = False))\n",
    "\n",
    "    train_address['street_address'] = train_address.index\n",
    "    df = df_data.merge(train_address[['street_address','low','medium','heigh']])\n",
    "    \n",
    "    return df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.9 对经纬度的处理。先进行聚类。测试下来聚类为20的效果最好。然后计算他们的距离，分别实验了曼哈顿和欧式距离。感觉两者差异不大。具体看测试结果说明"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.cluster import KMeans\n",
    "def processing_train_latitude_longtitude(df):\n",
    "    train_location = df.loc[:,['latitude','longitude']]\n",
    "\n",
    "    km = KMeans(n_clusters=20)\n",
    "\n",
    "    km.fit(train_location)\n",
    "    cluster = km.predict(train_location)\n",
    "\n",
    "    df['cenloc'] = cluster\n",
    "\n",
    "    center = [train_location['latitude'].mean(),train_location['longitude'].mean()]\n",
    "\n",
    "    #曼哈顿距离\n",
    "    df['distance'] = abs(df['latitude'] - center[0]) + abs(df['longitude'] - center[1])\n",
    "\n",
    "    #欧式距离\n",
    "    #df['distance'] = np.sqrt(pow((df['latitude']-center[0]),2) + pow((df['longitude']-center[1]),2))\n",
    "\n",
    "    df.drop(['latitude', 'longitude'], axis=1, inplace=True)\n",
    "\n",
    "    return km, center"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.10 #Features的处理 \n",
    "采用countvector进行feature字段的处理，然后形成稀疏矩阵。同时测试了tf-idf的处理方法，但是在用logistic回归测试时，报错。具体原因暂时不知道"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer\n",
    "from scipy import sparse\n",
    "def procdess_features_train_test(train_data):\n",
    "\n",
    "    n_train_samples = len(train_data.index)\n",
    "\n",
    "    df_train_test = pd.concat((train_data,test_data),axis = 0)\n",
    "    df_train_test['features_tmp'] = df_train_test['features'].apply(lambda x: ' '.join(x))\n",
    "\n",
    "    c_vect = CountVectorizer(stop_words='english', max_features=200, ngram_range=(1, 1), decode_error='ignore')\n",
    "\n",
    "    c_vect_sparse = c_vect.fit_transform(df_train_test['features_tmp'])\n",
    "    c_vect_sparse_cols = c_vect.get_feature_names()\n",
    "    # print(c_vect_sparse_cols)\n",
    "\n",
    "    train_data.drop(['features'], axis=1, inplace=True)\n",
    "    test_data.drop(['features'], axis=1, inplace=True)\n",
    "\n",
    "    # hstack作为特征处理的最后一部，先将其他所有特征都转换成数值型特征才能处理,稀疏表示\n",
    "    df_train_sparse = sparse.hstack([train_data, c_vect_sparse[:n_train_samples,:]]).tocsr()\n",
    "    # df_test_sparse = sparse.hstack([test_data, c_vect_sparse[n_train_samples:,:]]).tocsr()\n",
    "\n",
    "    tmp_train = pd.DataFrame(c_vect_sparse.toarray()[:n_train_samples,:],columns=c_vect_sparse_cols,index=train_data.index)\n",
    "    train_data = pd.concat([train_data,tmp_train],axis = 1)\n",
    "\n",
    "#     tmp_test = pd.DataFrame(c_vect_sparse.toarray()[n_train_samples:,:],columns=c_vect_sparse_cols,index=test_data.index)\n",
    "#     test_data = pd.concat([test_data,tmp_test],axis = 1)\n",
    "\n",
    "    return df_train_sparse,train_data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2、数据保存"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "train_data = processing_train_manager_id(train_data)\n",
    "processing_address()\n",
    "processing_fileds(train_data)\n",
    "procdess_created_date(train_data)\n",
    "kmeans_cluster,center = processing_train_latitude_longtitude(train_data)\n",
    "processing_address(train_data)\n",
    "\n",
    "y_map = {'low':2,'medium':1,'high':0}\n",
    "train_data['interest_level'] = train_data['interest_level'].apply(lambda x:y_map[x])\n",
    "\n",
    "y_train = train_data['interest_level']\n",
    "x_train = train_data.drop(['listing_id', 'interest_level','date_created', 'datecre','street_address'],axis = 1,inplace = True)\n",
    "test_data.drop(['listing_id'], axis = 1, inplace = True)\n",
    "\n",
    "#数据标准化的处理，测试下来，MinMax的方式比Standard的方式稍微好一些。\n",
    "from sklearn.preprocessing import StandardScaler,MinMaxScaler\n",
    "std = MinMaxScaler()\n",
    "std_col = ['price','Year','Yday']\n",
    "std_train = train_data[std_col].values\n",
    "std_train = std.fit_transform(std_train)\n",
    "std_train_df = pd.DataFrame(std_train,columns=['price','Year','Yday'],index=train_data.index)\n",
    "train_data.drop(['price','Year','Yday'],axis = 1,inplace = True)\n",
    "train_new = pd.concat((train_data,std_train_df),axis = 1)\n",
    "train_data = train_new\n",
    "\n",
    "x_train_sparse,train = procdess_features_train_test(train_data)\n",
    "train = pd.concat([train, y_train], axis=1)\n",
    "train.to_csv('RentListingInquries_FE_train.csv', index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#存成稀疏矩阵，方便SVM调用\n",
    "from scipy.io import mmwrite\n",
    "train_sparse = sparse.hstack([x_train_sparse,sparse.csr_matrix(y_train).T]).tocsr()\n",
    "mmwrite('RentListingInquries_FE_train_sparse.txt',train_sparse)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
